package cn.edu.wynu.constructor;

public class Student {
    String name;
    double score;

    // 无参数构造器，也可以重载
    public Student(){
        System.out.println("无参数构造器被触发执行！");
    }
    // 有参数的构造器
    public Student(String name,double score){
        System.out.println("有参数的构造器被触发执行！");
        this.name = name;
        this.score = score;
    }
}
